﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ig="http://schemas.infragistics.com/xaml" 
    xmlns:igPrim="http://schemas.infragistics.com/xaml/primitives">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="ColorsBrush.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <SolidColorBrush x:Key="CellItemAltNormalBackgroundBrush" Color="#FFF6F9FC" />
    <SolidColorBrush x:Key="CellRowHoverBackgroundBrush" Color="#FFE6EFF7" />
    <SolidColorBrush x:Key="CellItemNormalBorderBrush" Color="#FFC9CACA" />
    <SolidColorBrush x:Key="CellSelectedStateBackgroundBrush" Color="#FFD5EAF2" />

    <LinearGradientBrush x:Key="HeaderNormalBackgroundBrush" EndPoint="0,1" StartPoint="0,0">
        <LinearGradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#FFfefefe" Offset="0"/>
                <GradientStop Color="#FFeff1f2" Offset="0.5"/>
                <GradientStop Color="#FFd0d6db" Offset="1"/>
            </GradientStopCollection>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>

    <SolidColorBrush x:Key="HeaderNormalForegroundBrush" Color="#FF444444"/>
    <SolidColorBrush x:Key="HeaderNormalBorderBrush" Color="#FFC9CACA"/>
    <SolidColorBrush x:Key="FocusBrush" Color="#FF6DBDD1"/>

    <LinearGradientBrush x:Key="PopupBackgroundBrush" EndPoint="0,1" StartPoint="0,0">
        <LinearGradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#FFFFFFFF" Offset="0"/>
                <GradientStop Color="#FFFEFEFE" Offset="1"/>
            </GradientStopCollection>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>

    <SolidColorBrush x:Key="FilterSelectionVerticalBrush" Color="#FFF2F4F5"/>
    <LinearGradientBrush x:Key="HeaderCellGlyphBrush" EndPoint="0,1" StartPoint="0,0">
        <LinearGradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#FFa3aeb9" Offset="0"/>
                <GradientStop Color="#FF8399a9" Offset="0.37"/>
                <GradientStop Color="#FF718597" Offset="0.370"/>
                <GradientStop Color="#FF617583" Offset="1"/>
            </GradientStopCollection>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>

    <SolidColorBrush x:Key="FilterSelectionItemBackgroundBrush" Color="#FFCAE4ED"/>
    <SolidColorBrush x:Key="FilterSelectionItemBorderBrush" Color="#FF6DBDD1"/>
    <LinearGradientBrush x:Key="GridBorderBrush" EndPoint="0,1" StartPoint="0,0">
        <LinearGradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#FFa3aeb9" Offset="0"/>
                <GradientStop Color="#FF8399a9" Offset="0.37"/>
                <GradientStop Color="#FF718597" Offset="0.370"/>
                <GradientStop Color="#FF617583" Offset="1"/>
            </GradientStopCollection>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="HeaderHoverBackgroundBrush" EndPoint="0,1" StartPoint="0,0">
        <LinearGradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#FFfefefe" Offset="0"/>
                <GradientStop Color="#FFf4f9fc" Offset="0.35"/>
                <GradientStop Color="#FFa9cae6" Offset="1"/>
            </GradientStopCollection>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="HeaderMovingBackgroundBrush" Color="#FF000000"/>

    <Style x:Key="BlueHeaderStyle" TargetType="igPrim:HeaderCellControl">
        <!--<Setter Property="FontSize" Value="11"/>
    		<Setter Property="Background" Value="{StaticResource HeaderNormalBackgroundBrush}"/>
    		<Setter Property="Foreground" Value="{StaticResource HeaderNormalForegroundBrush}"/>
    		<Setter Property="BorderBrush" Value="{StaticResource HeaderNormalBorderBrush}"/>-->
        <!--<Setter Property="HorizontalContentAlignment" Value="Left"/>-->
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Foreground" Value="#FFFFFFFF" />
        <Setter Property="VerticalContentAlignment" Value="Bottom" />
        <Setter Property="Padding" Value="5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="igPrim:HeaderCellControl">
                    <igPrim:SimpleClickableContainer x:Name="NormalFill" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                        <igPrim:SimpleClickableContainer.Resources>
                            <Style x:Key="ColumnChooserDialogBtn" TargetType="Button">
                                <Setter Property="Background" Value="{StaticResource FilterSelectionItemBackgroundBrush}"/>
                                <Setter Property="BorderBrush" Value="{StaticResource FilterSelectionItemBorderBrush}"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid Background="Transparent">
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="24"/>
                                                    <ColumnDefinition Width="*"/>
                                                </Grid.ColumnDefinitions>
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Bd">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed"/>
                                                        <VisualState x:Name="Disabled"/>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup x:Name="FocusStates">
                                                        <VisualState x:Name="Focused"/>
                                                        <VisualState x:Name="Unfocused"/>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>

                                                <Rectangle x:Name="Bd" Grid.ColumnSpan="2" Fill="{TemplateBinding Background}" RadiusY="1" RadiusX="1" Stroke="{TemplateBinding BorderBrush}" Visibility="Collapsed"/>

                                                <Grid x:Name="columnChooserIcon" HorizontalAlignment="Center" Height="14" VerticalAlignment="Center" Width="14">
                                                    <Path Data="M 3,0 C3,0 3,4 3,4 3,4 0,4 0,4 0,4 0,14 0,14 0,14 7,14 7,14 7,14 7,10 7,10 7,10 14,10 14,10 14,10 14,0 14,0 14,0 3,0 3,0 z" Fill="{StaticResource HeaderNormalBackgroundBrush}"/>
                                                    <Path Data="M 1,5 C1,5 6,5 6,5 6,5 6,7 6,7 6,7 1,7 1,7 1,7 1,5 1,5 zM 1,8 C1,8 6,8 6,8 6,8 6,10 6,10 6,10 1,10 1,10 1,10 1,8 1,8 zM 1,11 C1,11 6,11 6,11 6,11 6,13 6,13 6,13 1,13 1,13 1,13 1,11 1,11 zM 7,7 C7,7 13,7 13,7 13,7 13,9 13,9 13,9 7,9 7,9 7,9 7,7 7,7 zM 7,4 C7,4 13,4 13,4 13,4 13,6 13,6 13,6 7,6 7,6 7,6 7,4 7,4 zM 4,1 C4,1 13,1 13,1 13,1 13,3 13,3 13,3 4,3 4,3 4,3 4,1 4,1 zM 3,0 C3,0 3,4 3,4 3,4 0,4 0,4 0,4 0,14 0,14 0,14 7,14 7,14 7,14 7,10 7,10 7,10 14,10 14,10 14,10 14,0 14,0 14,0 3,0 3,0 z" Fill="{StaticResource GridBorderBrush}"/>
                                                    <Grid Margin="0,0,0,1">
                                                        <Border BorderBrush="Black" BorderThickness="0,0,1,1" CornerRadius="0,0,2,0" Height="3" Margin="0,0,2,2" Width="6"/>
                                                        <Path Data="M 0,2 C0,2 0,3 0,3 0,3 5,3 5,3 5,3 5,2 5,2 5,2 4,2 4,2 4,2 4,1 4,1 4,1 3,1 3,1 3,1 3,0 3,0 3,0 2,0 2,0 2,0 2,1 2,1 2,1 1,1 1,1 1,1 1,2 1,2 1,2 0,2 0,2 z" Fill="Black" Height="3" Margin="3,1,0,0" Stretch="Fill" VerticalAlignment="Top" Width="5"/>
                                                    </Grid>
                                                </Grid>
                                                <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </igPrim:SimpleClickableContainer.Resources>
                        <ig:Commanding.Commands>
                            <ig:XamGridColumnCommandSource CommandType="Select" EventName="SimpleClick"/>
                            <ig:XamGridColumnCommandSource CommandType="SortToggle" EventName="SimpleClick"/>
                        </ig:Commanding.Commands>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetProperty="Background" Storyboard.TargetName="Bd">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Transparent"/>
                                            <!--Value="{StaticResource HeaderHoverBackgroundBrush}"/>-->
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetProperty="Background" Storyboard.TargetName="SortAndPinIndicators">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Transparent"/>
                                            <!--Value="{StaticResource HeaderHoverBackgroundBrush}"/>-->
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Moving">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="NormalFill">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="0.4"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.001" Storyboard.TargetProperty="Background" Storyboard.TargetName="Bd">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource HeaderMovingBackgroundBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FixedIndicatorStates">
                                <VisualState x:Name="NotFixable"/>
                                <VisualState x:Name="Pinned">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PinnedIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unpinned">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="UnpinnedIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SummaryStates">
                                <VisualState x:Name="Summable">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="SummaryHeaderDropDownControl">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unsummable"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SortedStates">
                                <VisualState x:Name="NotSorted"/>
                                <VisualState x:Name="Ascending">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SortedAscending">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Descending">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="SortedDescending">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="HeaderFilterStates">
                                <VisualState x:Name="NoIcon">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FilterHeaderDropDownControl">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="FilterIcon">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FilterHeaderDropDownControl">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="HeaderFilterAppliedStates">
                                <VisualState x:Name="NotFiltered">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="clearFilterGlyphFill">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="redFilterGlyphFill">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Filtered">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="clearFilterGlyphFill">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="redFilterGlyphFill">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="VisibilityIconStates">
                                <VisualState x:Name="VisibilityIconHidden"/>
                                <VisualState x:Name="VisibilityIconVisible">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="VisibilityToggleButton">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="LeftAdjacentColumnHiddenStates">
                                <VisualState x:Name="NoHiddenLeftAdjacentColumns"/>
                                <VisualState x:Name="HiddenLeftAdjacentColumns">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="HiddenLeftAdjacentColumnsElement">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="RightAdjacentColumnHiddenStates">
                                <VisualState x:Name="NoHiddenRightAdjacentColumns"/>
                                <VisualState x:Name="LastVisibleColumnWithHiddenRightAdjacentColumns">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="HiddenRightAdjacentColumnsElement">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Grid x:Name="Bd">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <igPrim:HeaderDropDownControl x:Name="HiddenLeftAdjacentColumnsElement" Grid.Column="0" Padding="0" Visibility="Collapsed">
                                <igPrim:HeaderDropDownControl.OpenButtonContent>
                                    <Border Background="Transparent" Width="10">
                                        <Rectangle Fill="{StaticResource FocusBrush}" HorizontalAlignment="Left" Width="3"/>
                                    </Border>
                                </igPrim:HeaderDropDownControl.OpenButtonContent>
                                <ToolTipService.ToolTip>
                                    <ToolTip Content="{Binding Cell.Column.ColumnLayout.Grid.ColumnChooserSettings.HiddenColumnIndicatorToolTipText, RelativeSource={RelativeSource TemplatedParent}}"/>
                                </ToolTipService.ToolTip>
                                <Grid>
                                    <Border x:Name="ColumnChooserBd" BorderBrush="{StaticResource FocusBrush}" BorderThickness="1" Background="{StaticResource PopupBackgroundBrush}" CornerRadius="3" MaxHeight="200" Padding="1">
                                        <Border.Effect>
                                            <DropShadowEffect BlurRadius="10" Direction="270" Opacity="0.35" ShadowDepth="0"/>
                                        </Border.Effect>
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition MaxWidth="24" MinWidth="24"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>
                                            <Grid.RowDefinitions>
                                                <RowDefinition/>
                                                <RowDefinition Height="Auto"/>
                                            </Grid.RowDefinitions>
                                            <Border Background="{StaticResource FilterSelectionVerticalBrush}" Grid.RowSpan="2"/>
                                            <ListBox BorderThickness="0" Grid.ColumnSpan="2" DataContext="{x:Null}" ItemsSource="{Binding Cell.ColumnsHiddenToLeft, RelativeSource={RelativeSource TemplatedParent}}" Margin="0" Padding="0">
                                                <ig:Commanding.Commands>
                                                    <ig:XamGridColumnCommandSource CommandType="Show" EventName="SelectionChanged" ParameterBinding="{Binding SelectedItem}"/>
                                                    <igPrim:XamGridPopupCommandSource CommandType="ClosePopup" EventName="SelectionChanged"/>
                                                </ig:Commanding.Commands>
                                                <ListBox.ItemTemplate>
                                                    <DataTemplate>
                                                        <TextBlock Text="{Binding DisplayNameResolved}"/>
                                                    </DataTemplate>
                                                </ListBox.ItemTemplate>
                                            </ListBox>
                                            <StackPanel Background="Transparent" Grid.ColumnSpan="2" Grid.Row="1">
                                                <Rectangle x:Name="separator" Fill="{StaticResource FocusBrush}" Height="1"/>
                                                <Button Margin="0,1,0,0" Style="{StaticResource ColumnChooserDialogBtn}">
                                                    <ig:Commanding.Commands>
                                                        <ig:XamGridColumnChooserCommandSource CommandType="Open" EventName="Click"/>
                                                        <igPrim:XamGridPopupCommandSource CommandType="ClosePopup" EventName="Click"/>
                                                    </ig:Commanding.Commands>
                                                    <TextBlock Foreground="{StaticResource HeaderNormalForegroundBrush}" Text="{Binding Cell.Column.ColumnLayout.Grid.ColumnChooserSettings.ColumnChooserDisplayText, RelativeSource={RelativeSource TemplatedParent}}"/>
                                                </Button>
                                            </StackPanel>
                                        </Grid>
                                    </Border>
                                </Grid>
                            </igPrim:HeaderDropDownControl>

                            <Border Margin="0,1,1,0" Background="#0099cc" CornerRadius="5,5,0,0" Grid.Column="1" Grid.ColumnSpan="2">
                                <Border Margin="1,1,1,0" CornerRadius="5,5,0,0">
                                    <Border.Background>
                                        <LinearGradientBrush StartPoint="1,0" EndPoint="0.569,1.451">
                                            <LinearGradientBrush.GradientStops>
                                                <GradientStopCollection>
                                                    <GradientStop Offset="0.200" Color="#FF0099cc" />
                                                    <GradientStop Offset="0.977" Color="#FF00ccff" />
                                                </GradientStopCollection>
                                            </LinearGradientBrush.GradientStops>
                                        </LinearGradientBrush>
                                    </Border.Background>

                                    <Border>
                                        <Border.Background>
                                            <LinearGradientBrush StartPoint="0.505,-0.117" EndPoint="0.505,1.176">
                                                <LinearGradientBrush.GradientStops>
                                                    <GradientStopCollection>
                                                        <GradientStop Offset="0" Color="#000099cc" />
                                                        <GradientStop Offset="0.972" Color="#FF333333" />
                                                    </GradientStopCollection>
                                                </LinearGradientBrush.GradientStops>
                                            </LinearGradientBrush>
                                        </Border.Background>

                                        <Path Width="30" Height="10" HorizontalAlignment="Right" VerticalAlignment="Top" 
                                                  Data="M 527,265 C527,265 527,245 527,245 527,243 525,240 522,240 522,240 500,240 500,240 500,240 527,265 527,265 z" 
                                                  Opacity="0.690" Stretch="Fill">
                                            <Path.Fill>
                                                <LinearGradientBrush StartPoint="0.925,0.04" EndPoint="0.424,0.519">
                                                    <LinearGradientBrush.GradientStops>
                                                        <GradientStopCollection>
                                                            <GradientStop Offset="0" Color="#8cffffff" />
                                                            <GradientStop Offset="0.966" Color="#44ffffff" />
                                                        </GradientStopCollection>
                                                    </LinearGradientBrush.GradientStops>
                                                </LinearGradientBrush>
                                            </Path.Fill>
                                        </Path>
                                    </Border>

                                </Border>
                            </Border>

                            <ContentPresenter Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>

                            <Grid x:Name="SortAndPinIndicators" Grid.Column="2" HorizontalAlignment="Right" Margin="0,0,5,0"
                                      Background="{x:Null}">
                                <!--Background="{TemplateBinding Background}">-->
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>

                                <!--<Path x:Name="SortedDescending" Data="M 0 0 L 4 4 L 8 0 Z" Fill="{StaticResource HeaderCellGlyphBrush}" HorizontalAlignment="Right" Margin="3,0" Visibility="Collapsed" VerticalAlignment="Center"/>
    								<Path x:Name="SortedAscending" Data="M0,4 L8,4 L4,0 z" Fill="{StaticResource HeaderCellGlyphBrush}" HorizontalAlignment="Right" Margin="3,0" Visibility="Collapsed" VerticalAlignment="Center"/>-->
                                <Path x:Name="SortedDescending" Data="M 0 0 L 4 4 L 8 0 Z" Fill="White" HorizontalAlignment="Right" Margin="3,0" Visibility="Collapsed" VerticalAlignment="Center"/>
                                <Path x:Name="SortedAscending" Data="M0,4 L8,4 L4,0 z" Fill="White" HorizontalAlignment="Right" Margin="3,0" Visibility="Collapsed" VerticalAlignment="Center"/>

                                <Grid x:Name="PinnedIndicator" Background="Transparent" Cursor="Hand" Grid.Column="3" Visibility="Collapsed">
                                    <ig:Commanding.Command>
                                        <ig:XamGridColumnCommandSource CommandType="Unfix" EventName="MouseLeftButtonDown"/>
                                    </ig:Commanding.Command>
                                    <Path Data="M 6,4 C6,4 8,4 8,4 8,4 8,9 8,9 8,9 6,9 6,9 6,9 6,4 6,4 zM 5,3 C5,3 5,9 5,9 5,9 4,9 4,9 4,9 4,10 4,10 4,10 7,10 7,10 7,10 7,13 7,13 7,13 8,13 8,13 8,13 8,10 8,10 8,10 11,10 11,10 11,10 11,9 11,9 11,9 10,9 10,9 10,9 10,3 10,3 10,3 5,3 5,3 z" Fill="{StaticResource HeaderCellGlyphBrush}" Height="10" Margin="3,0" Stretch="Fill" Width="7"/>
                                </Grid>
                                <Grid x:Name="UnpinnedIndicator" Background="Transparent" Cursor="Hand" Grid.Column="3" Visibility="Collapsed">
                                    <ig:Commanding.Command>
                                        <ig:XamGridColumnCommandSource CommandType="Fix" EventName="MouseLeftButtonDown"/>
                                    </ig:Commanding.Command>
                                    <Path Data="M 12,7 C12,7 12,9 12,9 12,9 7,9 7,9 7,9 7,7 7,7 7,7 12,7 12,7 zM 13,6 C13,6 7,6 7,6 7,6 7,5 7,5 7,5 6,5 6,5 6,5 6,8 6,8 6,8 3,8 3,8 3,8 3,9 3,9 3,9 6,9 6,9 6,9 6,12 6,12 6,12 7,12 7,12 7,12 7,11 7,11 7,11 13,11 13,11 13,11 13,6 13,6 z" Fill="{StaticResource HeaderCellGlyphBrush}" Height="7" Margin="3,0" Stretch="Fill" Width="10"/>
                                </Grid>
                                <igPrim:HeaderDropDownControl x:Name="SummaryHeaderDropDownControl" Background="Transparent" Grid.Column="1" Visibility="Collapsed">
                                    <igPrim:HeaderDropDownControl.OpenButtonContent>
                                        <Path x:Name="summarySigmaIcon" Data="M 0,0 C0,0 5,0 5,0 5,0 5,1 5,1 5,1 2,1 2,1 2,1 4,3.5 4,3.5 4,3.5 2,6 2,6 2,6 5,6 5,6 5,6 5,7 5,7 5,7 0,7 0,7 0,7 0,6 0,6 0,6 2,3.5625 2,3.5625 2,3.5625 0,1 0,1 0,1 0,0 0,0 z" Fill="{StaticResource HeaderCellGlyphBrush}" Height="7" StrokeThickness="0" Width="5"/>
                                    </igPrim:HeaderDropDownControl.OpenButtonContent>
                                    <igPrim:SummarySelectionControl Cell="{Binding Cell, RelativeSource={RelativeSource TemplatedParent}}"/>
                                </igPrim:HeaderDropDownControl>
                                <igPrim:HeaderDropDownControl x:Name="FilterHeaderDropDownControl" Background="Transparent" Grid.Column="2" Visibility="Collapsed">
                                    <igPrim:HeaderDropDownControl.OpenButtonContent>
                                        <Grid>
                                            <Path x:Name="clearFilterGlyphStroke" Data="M 0,0 C0,0 11,0 11,0 11,0 7,4 7,4 7,4 7,8 7,8 7,8 4,8 4,8 4,8 4,4 4,4 4,4 0,0 0,0 z" Fill="{StaticResource HeaderCellGlyphBrush}" HorizontalAlignment="Center" Height="8" Stretch="Fill" VerticalAlignment="Center" Width="11"/>
                                            <Path x:Name="clearFilterGlyphFill" Data="M 0,0 C0,0 7,0 7,0 7,0 4,3 4,3 4,3 4,6 4,6 4,6 3,6 3,6 3,6 3,3 3,3 3,3 0,0 0,0 z" Fill="#FFFFFFFF" HorizontalAlignment="Center" Height="6" Stretch="Fill" VerticalAlignment="Center" Width="7"/>
                                            <Path x:Name="redFilterGlyphFill" Data="M 0,0 C0,0 7,0 7,0 7,0 4,3 4,3 4,3 4,6 4,6 4,6 3,6 3,6 3,6 3,3 3,3 3,3 0,0 0,0 z" Fill="{StaticResource FocusBrush}" HorizontalAlignment="Center" Height="6" Stretch="Fill" Visibility="Collapsed" VerticalAlignment="Center" Width="7"/>
                                        </Grid>
                                    </igPrim:HeaderDropDownControl.OpenButtonContent>
                                    <igPrim:FilterSelectionControl Cell="{Binding Cell, RelativeSource={RelativeSource TemplatedParent}}"/>
                                </igPrim:HeaderDropDownControl>
                                <Grid x:Name="VisibilityToggleButton" Background="Transparent" Cursor="Hand" Grid.Column="4" Visibility="Collapsed" Width="14">
                                    <ig:Commanding.Command>
                                        <ig:XamGridColumnCommandSource CommandType="Hide" EventName="MouseLeftButtonDown"/>
                                    </ig:Commanding.Command>
                                    <Path Data="M 7,0 C7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 5,4 5,4 5,4 5,5 5,5 5,5 6,5 6,5 6,5 6,6 6,6 6,6 7,6 7,6 7,6 7,7 7,7 7,7 8,7 8,7 8,7 8,5 8,5 8,5 7,5 7,5 7,5 7,4 7,4 7,4 6,4 6,4 6,4 6,3 6,3 6,3 7,3 7,3 7,3 7,2 7,2 7,2 8,2 8,2 8,2 8,0 8,0 8,0 7,0 7,0 zM 0,3 C0,3 0,4 0,4 0,4 1,4 1,4 1,4 1,5 1,5 1,5 2,5 2,5 2,5 2,6 2,6 2,6 3,6 3,6 3,6 3,7 3,7 3,7 4,7 4,7 4,7 4,6 4,6 4,6 4,5 4,5 4,5 3,5 3,5 3,5 3,4 3,4 3,4 2,4 2,4 2,4 2,3 2,3 2,3 3,3 3,3 3,3 3,2 3,2 3,2 4,2 4,2 4,2 4,1 4,1 4,1 4,0 4,0 4,0 3,0 3,0 3,0 3,1 3,1 3,1 2,1 2,1 2,1 2,2 2,2 2,2 1,2 1,2 1,2 1,3 1,3 1,3 0,3 0,3 z" Fill="{StaticResource HeaderCellGlyphBrush}" Height="7" Width="8"/>
                                </Grid>
                            </Grid>
                            <igPrim:HeaderDropDownControl x:Name="HiddenRightAdjacentColumnsElement" Grid.Column="4" Padding="0" Visibility="Collapsed">
                                <igPrim:HeaderDropDownControl.OpenButtonContent>
                                    <Border Background="Transparent" Width="10">
                                        <Rectangle Fill="{StaticResource FocusBrush}" HorizontalAlignment="Right" Width="3"/>
                                    </Border>
                                </igPrim:HeaderDropDownControl.OpenButtonContent>
                                <ToolTipService.ToolTip>
                                    <ToolTip Content="{Binding Cell.Column.ColumnLayout.Grid.ColumnChooserSettings.HiddenColumnIndicatorToolTipText, RelativeSource={RelativeSource TemplatedParent}}"/>
                                </ToolTipService.ToolTip>
                                <Grid>
                                    <Border x:Name="ColumnChooserBdRight" BorderBrush="{StaticResource FocusBrush}" BorderThickness="1" Background="{StaticResource PopupBackgroundBrush}" CornerRadius="3" MaxHeight="200" Padding="1">
                                        <Border.Effect>
                                            <DropShadowEffect BlurRadius="10" Direction="270" Opacity="0.35" ShadowDepth="0"/>
                                        </Border.Effect>
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition MaxWidth="24" MinWidth="24"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>
                                            <Grid.RowDefinitions>
                                                <RowDefinition/>
                                                <RowDefinition Height="Auto"/>
                                            </Grid.RowDefinitions>
                                            <Border Background="{StaticResource FilterSelectionVerticalBrush}" Grid.RowSpan="2"/>
                                            <ListBox BorderThickness="0" Grid.ColumnSpan="2" DataContext="{x:Null}" ItemsSource="{Binding Cell.ColumnsHiddenToRight, RelativeSource={RelativeSource TemplatedParent}}" Margin="0" Padding="0">
                                                <ig:Commanding.Commands>
                                                    <ig:XamGridColumnCommandSource CommandType="Show" EventName="SelectionChanged" ParameterBinding="{Binding SelectedItem}"/>
                                                    <igPrim:XamGridPopupCommandSource CommandType="ClosePopup" EventName="SelectionChanged"/>
                                                </ig:Commanding.Commands>
                                                <ListBox.ItemTemplate>
                                                    <DataTemplate>
                                                        <TextBlock Text="{Binding DisplayNameResolved}"/>
                                                    </DataTemplate>
                                                </ListBox.ItemTemplate>
                                            </ListBox>
                                            <StackPanel Background="Transparent" Grid.ColumnSpan="2" Grid.Row="1">
                                                <Rectangle x:Name="separatorRight" Fill="{StaticResource FocusBrush}" Height="1"/>
                                                <Button Margin="0,1,0,0" Style="{StaticResource ColumnChooserDialogBtn}">
                                                    <ig:Commanding.Commands>
                                                        <ig:XamGridColumnChooserCommandSource CommandType="Open" EventName="Click"/>
                                                        <igPrim:XamGridPopupCommandSource CommandType="ClosePopup" EventName="Click"/>
                                                    </ig:Commanding.Commands>
                                                    <TextBlock Foreground="{StaticResource HeaderNormalForegroundBrush}" Text="{Binding Cell.Column.ColumnLayout.Grid.ColumnChooserSettings.ColumnChooserDisplayText, RelativeSource={RelativeSource TemplatedParent}}"/>
                                                </Button>
                                            </StackPanel>
                                        </Grid>
                                    </Border>
                                </Grid>
                            </igPrim:HeaderDropDownControl>
                        </Grid>

                    </igPrim:SimpleClickableContainer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="AddRowStyling" TargetType="igPrim:AddNewRowCellControl">
        <Setter Property="FontSize" Value="11" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,1" EndPoint="0,0">
                    <LinearGradientBrush.GradientStops>
                        <GradientStopCollection>
                            <GradientStop Offset="0" Color="#FFFFFFFF" />
                            <GradientStop Offset="1" Color="#FFC3C3C3" />
                        </GradientStopCollection>
                    </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="#FF666666" />
        <Setter Property="BorderThickness" Value="0,2,0,2" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="Padding" Value="5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="igPrim:AddNewRowCellControl">
                    <Border x:Name="AddNewRowElem" 
                            Background="{TemplateBinding Background}" 
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            BorderBrush="{TemplateBinding BorderBrush}">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal" />
                                    <VisualState x:Name="MouseOver" />
                                    <VisualState x:Name="Alternate" />
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="SelectedStates">
                                    <VisualState x:Name="NotSelected" />
                                    <VisualState x:Name="Selected" />
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="ActiveStates" />
                                <VisualStateGroup x:Name="FixedStates">
                                    <VisualState x:Name="Fixed" />
                                    <VisualState x:Name="Unfixed" />
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>

                            <Rectangle Fill="#99FFFFFF" Height="1" VerticalAlignment="Top" />
                            <Border BorderThickness="0,0,1,0" BorderBrush="#FFC9CACA" />
                            <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                              Margin="{TemplateBinding Padding}" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="CellEditStyle" TargetType="ig:CellControl">
        <Setter Property="Background" Value="White" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ig:CellControl">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOver1" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Alternate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AltElem" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="SelectedStates">
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 
                                                                           Storyboard.TargetName="SelectedRect" 
                                                                           Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NotSelected" />
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="ActiveStates">
                                <VisualState x:Name="Active">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 
                                                                           Storyboard.TargetName="ActiveRect" 
                                                                           Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InActive" />
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="FixedStates">
                                <VisualState x:Name="Fixed" />
                                <VisualState x:Name="Unfixed" />
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="EditingStates">
                                <VisualState x:Name="Editing">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" 
                                                                           Storyboard.TargetName="editingTopHighlight" 
                                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1">
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <ExponentialEase EasingMode="EaseOut" />
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" 
                                                                           Storyboard.TargetName="editingBottomHighlight" 
                                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1">
                                                <EasingDoubleKeyFrame.EasingFunction>
                                                    <ExponentialEase EasingMode="EaseOut" />
                                                </EasingDoubleKeyFrame.EasingFunction>
                                            </EasingDoubleKeyFrame>
                                        </DoubleAnimationUsingKeyFrames>

                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NotEditing">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" 
                                                                           Storyboard.TargetName="content" 
                                                                           Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Thickness>5,5,5,5</Thickness>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="Root" 
                                    BorderBrush="{TemplateBinding BorderBrush}" 
                                    BorderThickness="{TemplateBinding BorderThickness}" 
                                    Background="{TemplateBinding Background}" />

                        <Border x:Name="AltElem"
                                    BorderBrush="{TemplateBinding BorderBrush}" 
                                    BorderThickness="{TemplateBinding BorderThickness}" 
                                    Background="{StaticResource CellItemAltNormalBackgroundBrush}" 
                                    Visibility="Collapsed" />

                        <Rectangle x:Name="MouseOver1" 
                                       Fill="{StaticResource CellRowHoverBackgroundBrush}" 
                                       Visibility="Collapsed" Margin="{TemplateBinding BorderThickness}" />

                        <Border x:Name="SelectedRect" Background="#FFB9E2F5" Visibility="Collapsed" />
                        <Rectangle x:Name="ActiveRect" Visibility="Collapsed" />

                        <ContentPresenter x:Name="content" 
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                              Margin="{TemplateBinding Padding}" />
                        <Rectangle x:Name="editingTopHighlight" 
                                       Height="10" Margin="0" 
                                       VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" 
                                       Canvas.ZIndex="1000" IsHitTestVisible="False" Opacity="0">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,0.832" StartPoint="0.5,-0.907">
                                    <GradientStop Color="#00FEAC00" Offset="1" />
                                    <GradientStop Color="#FFFE9300" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle x:Name="editingBottomHighlight" Height="10" 
                                       RenderTransformOrigin="0.5,0.5" VerticalAlignment="Bottom" 
                                       Canvas.ZIndex="1000" IsHitTestVisible="False" Opacity="0">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1.504" StartPoint="0.5,0.235">
                                    <GradientStop Color="#00FEAC00" />
                                    <GradientStop Color="#FFFE9300" Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="BrushColumnStyle" TargetType="ig:CellControl">
        <!--<Setter Property="BorderBrush" Value="{StaticResource CellItemNormalBorderBrush}" />-->
        <!--<Setter Property="BorderThickness" Value="0,0,1,0" />-->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ig:CellControl">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 
                                                                           Storyboard.TargetName="NormalState" 
                                                                           Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverState" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Alternate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AlternateState" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectedStates">
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 
                                                                           Storyboard.TargetName="SelectedRect" 
                                                                           Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NotSelected" />
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="ActiveStates">
                                <VisualState x:Name="Active">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 
                                                                           Storyboard.TargetName="ActiveRect" 
                                                                           Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InActive" />
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="FixedStates">
                                <VisualState x:Name="Fixed" />
                                <VisualState x:Name="Unfixed" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EditingStates">
                                <VisualState x:Name="Editing" />
                                <VisualState x:Name="NotEditing" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="Root"
                                    BorderBrush="{TemplateBinding BorderBrush}" 
                                    BorderThickness="{TemplateBinding BorderThickness}" 
                                    Background="{TemplateBinding Background}" />

                        <Border x:Name="AlternateState"
                                BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}" 
                                Background="{StaticResource CellItemAltNormalBackgroundBrush}" 
                                Visibility="Collapsed" />

                        <Rectangle x:Name="MouseOverState" 
                                   Fill="{StaticResource CellRowHoverBackgroundBrush}" 
                                   Margin="{TemplateBinding BorderThickness}" 
                                   Visibility="Collapsed" />

                        <Border x:Name="SelectedRect" Visibility="Collapsed" />
                        <Rectangle x:Name="ActiveRect" Fill="#FFB9E2F5" Visibility="Collapsed"  Margin="0,0,1,0" />

                        <Rectangle Margin="0,0,1,0" Fill="{StaticResource GrayGradientBrush}"/>

                        <Rectangle Fill="#00333333" Height="1" VerticalAlignment="Bottom" Margin="0,0,1,0" />

                        <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                          Margin="{TemplateBinding Padding}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="CellColumnStyle" TargetType="ig:CellControl">
        <Setter Property="BorderBrush" Value="{StaticResource CellItemNormalBorderBrush}" />
        <Setter Property="BorderThickness" Value="0,0,1,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ig:CellControl">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 
                                                                           Storyboard.TargetName="NormalState" 
                                                                           Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MouseOverState" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Alternate">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="AlternateState" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectedStates">
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 
                                                                           Storyboard.TargetName="SelectedState" 
                                                                           Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NotSelected" />
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="ActiveStates">
                                <VisualState x:Name="Active">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 
                                                                           Storyboard.TargetName="ActiveState" 
                                                                           Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InActive" />
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="FixedStates">
                                <VisualState x:Name="Fixed" />
                                <VisualState x:Name="Unfixed" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="EditingStates">
                                <VisualState x:Name="Editing" />
                                <VisualState x:Name="NotEditing" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="Root"
                                BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}" 
                                Background="{TemplateBinding Background}" 
                                />

                        <Border x:Name="NormalState" Visibility="Collapsed" 
                                Background="{StaticResource GrayGradientBrush}" 
                                BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}"
                                />
                        <Border x:Name="AlternateState" Visibility="Collapsed" 
                                Background="{StaticResource GrayGradientBrush}" 
                                BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}"
                                />
                        <Rectangle x:Name="MouseOverState" Visibility="Collapsed" 
                                   Fill="{StaticResource CellRowHoverBackgroundBrush}" 
                                   Margin="{TemplateBinding BorderThickness}"
                                   />

                        <Border x:Name="SelectedState" Visibility="Collapsed" 
                                Background="{StaticResource CellSelectedStateBackgroundBrush}" 
                                BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}"
                                />
                        <Rectangle x:Name="ActiveState" Visibility="Collapsed" 
                                   Margin="1,0,1,0" 
                                   />

                        <ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                                          Margin="{TemplateBinding Padding}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
